Synthesis of microwave lossy filters
LossyFilters
2.0.3
June 11, 2013
by
J.M.Rius, J.Mateu, J.M.Tamayo, C.Collado, A. Padilla and J.O'Callaghan
Universitat Politècnica de Catalunya (UPC)
Appendix
The project goals at large are to investigate novel lossy filter synthesis
techniques to obtain filters whose insertion loss flatness can be made equal to that
of an (ideal) lossless filter, despite the limited Q of the resonators within the
filter. This project was supported by the European Space Agency (ESA) under contract
21398/08/NL/GLC.
The classical synthesis procedure consists on obtaining a purely reactive (no
dissipation effect) network that defines the resonant frequency of the resonators
forming the filter and the way they are coupled. However, in practice, some
dissipation always exist in the final filter implementation which can be evaluated
afterwards by introducing the material losses (finite Q of the resonators) into the
synthesized lossless network.
Among other effects, this approach leads to filters with minimum insertion loss
in the passband at one frequency at the expense of additional passband rounding
towards the band-edges, being the use of high Q resonators the only way to achieve
filters with flat pass-band response by means of classical synthesis techniques.
This may result in heavy and large filters which might be impractical in space
systems, or in wireless and handset components with strong demand for low-cost and
small size.
This can be overcome by the use of non standard filter synthesis techniques such
as:
- Pre-distortion synthesis: synthesizes a lossless network whose pole
placement is such that, after introducing the losses, produces the desired
(improved) in-band flatness. However, this is at the expense of increased in-band
signal reflections.
R. J. Cameron, C. M. Kudsia, R.R. Mansour, Microwave Filters for Communication
systems. Fundamentals, Design, and applications, John Wiley & Sons, 2007.
Dissipation I movement de sigma
Ming Yu et al., "Predistortion Technique for Cross-Coupled Filters and its
application to satellite communication systems", IEEE MTT-51, pp. 2505-2515,
Nov. 2003
- Prescribed insertion loss synthesis: In order to obtain both good
insertion loss flatness and good return loss, the insertion loss flatness is
obtained at the expense of an increase of the overall insertion loss, therefore the
resulting filters are of use in those applications where the filters are placed
after the low noise amplifier without affecting the noise figure, as it occurs in
input multiplexers (IMUX) for satellite transponders.
V. Miraftab, Ming Yu, "Advanced Coupling Matrix and Admittance Function
Synthesis Techniques for Dissipative Microwave Filters," Microwave Theory and
Techniques, IEEE Transactions on , vol.57, no.10, pp.2429-2438, Oct. 2009.
I. C. Hunter, A. Guyette, and R. D. Pollard, "Passive Microwave Receive
Filter Network Using Low-Q Resonators", IEEE microwave Magazine, September
2005.
A.C. Guyette, I. C. Hunter, R. Pollard, "The design of microwave bandpass
filters using resonators with nonuniform Q", IEEE MTT-54 (11), November 2006,
pp.3914-3922.
Using these lossy filters synthesis techniques, very low resonator Q that can be
employed and, therefore, low cost and compact filters (such as microstrip filters)
can be realized.
The main references to the work in this project are:
J.Mateu, C. Collado, J.M. O'Callaghan,
"Lossy Filter Synthesis and Study of Topology Solution Space",
ESA working paper 2366. TEC-ETM/2009.142/CE. First issued: September
2008.
J. Mateu, A. Padilla, C. Collado, M. Martinez-Mendoza, E. Rocas, C. Ernst, J M.
O'Callaghan,
"Synthesis of 4th order Lossy Filters with uniform Q distribution",
Microwave Symposium Digest (MTT), 2010 IEEE MTT-S International,
pp.568-571, 23-28 May 2010.
doi: 10.1109/MWSYM.2010.5517741
URL: http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=5517741&isnumber=5514662
URL: http://upcommons.upc.edu/e-prints/bitstream/2117/10412/1/Synthesis%20of%204th%20order%20Lossy%20Filters%20with%20uniform%20Q%20distribution.pdf
A. Padilla, J. Mateu, C. Collado,, C. Ernst, J.M. Rius,, J.M. Tamayo, J.M.
O'Callaghan,
"Comparison of lossy filters and predistorted filters using novel
software",
Microwave Symposium Digest (MTT), 2010 IEEE MTT-S International,
pp.1720-1723, 23-28 May 2010
doi: 10.1109/MWSYM.2010.5517713
URL: http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=5517713&isnumber=5514662
URL: http://upcommons.upc.edu/e-prints/bitstream/2117/10413/1/Comparison%20of%20lossy%20filters%20and%20predistorted%20filters%20using%20novel%20software.pdf
Authors:
J.M.Rius, J.Mateu, J.M.Tamayo, C.Collado, A. Padilla and J.O'Callaghan.
Dpt. Signal Theory and Communications, Universitat Politècnica de
Catalunya (UPC),
Copyright: ©2009 Universitat Politècnica de Catalunya (UPC).
Contact:
lossyfilters@tsc.upc.edu
http://www.tsc.upc.edu/lossyfilters
Acknowledgement:
The software was developed in the frame of contract 21398/08/NL/GLC with the
European Space Agency (ESA). Technical Offer was Christoph Ernst. Further features
were developed under contract UPC-C7767 with Thales Alenia Space España
(TAS-E).
Contributions to the definition of the software functionality and testing have
been made by Christoph Ernst, Mónica Martínez Mendoza and other
ESA-ESTEC personnel, and Santiago Sobrino and Luis Roglá from TAS-E.
Software description:
The LossyFilters software package has been written to synthesize filters
following various forms of classical (no-loss considered in the synthesis),
pre-distortion and prescribed insertion loss synthesis. This software obtains the
coupling matrix of several network topologies for a given response and allows
performing rotations on them to find the desired topology. Additionally, the
software allows to evaluate the effect of loss in the networks resulting from the
synthesis, even in those cases where the synthesis results in an ideal lossless
network (i.e., classical and pre-distortion synthesis).
The software package has been divided in two parts:
- Open-source GUI and free libraries: The graphical user interface (GUI)
MWfiltersGUI, the 'Free Filter Library' and the 'Common Functions Library' are free
open-source software with capability to edit the input parameters, synthesize
Butterwork, Chebyshev and Quasieliptic filters with minimum insertion loss, rotate
and save the filter coupling matrix and display and save the [S] parameters. The GUI
will also run the non-free libraries if they are installed in the system.
- Non-free libraries: The non-free libraries are not required but, when
they are installed in the system, allow the synthesis of Generalized Chebyshev
filters with prescribed transmission zeros and linear phase optimization
("Library of Extra Filters") and the synthesis of lossy filters with the
pre-distortion and prescribed insertion loss techniques ("Library of Lossy
Filters).
The GUI is full-featured with complete functionality to open, edit, save and
execute parameter files, as well as plot [S] parameters and manually edit coupling
matrices:
- Actions can be launched by menus, toolbar buttons or keyboard shortcuts.
- There are tooltips in the parameters edit widgets.
- Application output in main window log widget and status bar.
- Modeless parameter edit dialog window with Accept / Compute / Discard buttons,
to allow the computation with trial parameter values without closing the dialog.
- Preventive data validation at the parameters edit widgets in order to prevent
the user introducing invalid data.
- Frequency parameters edit widgets allow the user to set THz, GHz, MHz, kHZ, Hz
units.
- The parameter edit window detects if there are changes in the parameters, so
that the application can warn the user if he is going to destroy non-saved changes.
- Plots S-parameters graph with phase or group delay in right-axis.
- Plots support adding, moving and deleting markers.
- Select which results to plot.
- Zoom S-parameter plot.
- Manual and autoscaling for each axis of S-parameter plot.
- Print S-parameter plot to printer or PDF file.
- Display coupling matrices and Q of resonators.
- Edit coupling matrix topology for non-zero elements optimization.
- Coupling matrices window: Manual rotation, node scaling, element anhilitation,
add non-resonant nodes, edit matrix entries or Q values, file load/save, etc. There
are facilities to undo and revert to any previous state.
- Plot S-parameters computed from the current coupling matrix compared with
S-parameters computed from the characteristic polynomials. Display the average error
in dB.
- Read [S] parameters from Touchstone format file.
- Store, recover and compare results from different computations or read from
Touchstone format file.
- Specification mask read from file and plotted.
- Sensitivity analysis.
- User-selectable predistortion zeros.
- Code fully documented with Doxygen.
The free libraries have functionality to:
- Read and parse parameters file.
- Write parameters file.
- Printing strings to:
- Console, when called from the command line.
- Main window log widget, when called from the GUI.
- Catches syntax errors in the parameter file.
- Correctly handles non-ASCII characters. Reads and writes UTF-8 format parameter
files, accepts non-English characters in the GUI and in console output. When python
reports that an output device is not able to print non-ASCII characters, the console
interface replaces 8-bit characters by "?" in the output.
- Filter synthesis: Butterworth, Chebyshev and Quasielpitic filters.
- Generation of transversal coupling matrix (TCM) N+2.
- Functions to generate rotation matrices and to find the angle that zeroes a
given coupling matrix element.
- Transformation from transversal coupling matrix (TCM) to folded coupling matrix
(FCM) and to many other types of coupling matrices.
- Calculation of the passband coupling matrix, which is obtained from the
low-pass one by a scaling. The resulting passband coupling matrix can be directly
related to design parameters used for the filter design, such as the coupling
between resonators.
- Optimize coupling matrix elements for a given topology and resonator Q,
adjusting [S] parameters to the polynomials [S] parameters or to a specification
mask.
- Prescribed flatness for lossless-like filters with flat passband response. The
quality factor of a filter to emulate is specified in order to append additional
resonator losses.
- Displays Q of resonators.
- Compute energy stored at resonators and reactive couplings and power dissipated
at resonators and resistive couplings.
- Reports roundoff errors in polynomial roots and partial fraction expansion.
- Reports error in S-parameters computed from transversal and folded coupling
matrices compared with S-parameters computed from the characteristic polynomials.
- Code fully documented with Doxygen.
- The "Library of Extra filters" provides the following
additional functions:
- Generalized Chebyshev transfer function with arbitrary transmission zeros [from
Cameron, chapter 6].
- Linear phase equalization, optimizing the position of real and/or complex
transmission zeros.
- Code fully documented with Doxygen.
- The "Library of Lossy filters" provides the following
additional functions:
- Filter losses: predistortion (conventional or adaptive).
- Filter losses: "Prescribed insertion loss" with non-Uniform Q case 1
(k21+k11+k22 asymmetrical), case 2 (k21) and case 3 (k21+zero/pole).
- FCM matrix rotation to obtain uniform Q in resonators for Lossy Filter case-1
(kS11 + kS21), N=4 and N=6 and case-3 (kS21 + pole/zero), N=6. Automatic
symmetrization of transmission zeros if necessary.
- Code fully documented with Doxygen.
Copyright: ©2009 Universitat Politècnica de Catalunya (UPC).
Contact: lossyfilters@tsc.upc.edu
http://www.tsc.upc.edu/lossyfilters
The lossyfilters software package described below, including an open-source GUI,
free libraries and non-free libraries is owned by UPC and is protected by the
applicable copyright laws and international treaty provisions.
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. This program is distributed as is and with all possible
imperfections and faults. UPC does not warrant neither that the operation of this
program will be uninterrupted nor that it is error free. In no event shall UPC be
liable for any responsibilities arising out of the use or inability to use this
program or the documentation.
- Open-source GUI and libraries
The graphical user interface (GUI) mwfiltersgui.py and its associated files, the
'Free Filter Library' libfreefilters.py and the 'Common Functions Library'
libcommonfunc.py are free open-source software released under the GNU General Public
License (GPL) version 3.
You can redistribute it and/or modify it under the terms of the GNU GPL as
published by the Free Software Foundation; either version 3 of the License, or (at
your option) any later version. See the GNU GPL for more details. You should have
received a copy of the GNU GPL along with this program in file
"LICENSE.GPL3" or file "LICENSE.txt"; if not, download it from
http://www.gnu.org/licenses/gpl-3.0.html .
Additional permission under GNU GPL version 3 section 7:
If you modify this Program, or any covered work, by linking or combining it with
the "Extra Filters Library" (libextrafilters), the "Lossy Filters
Library" (liblossyfilters) or the "License Check Library"
(libchecklicense), or modified versions of that libraries, containing parts covered
by the terms described in files LICENSE.LIBEXTRAFILTERS and LICENSE.LIBLOSSYFILTERS,
the licensors of this Program grant you additional permission to convey the
resulting work.
Lossyfilters software GUI uses the open-source dbplot.py module, which is based
in part on the work of the Qwt project (http://qwt.sf.net) and has been released by
UPC under the terms of the GNU GPL version 3.
- Non-free libraries
The "Extra Filters Library" and the "Lossy Filters Library"
are not free software and need a user license from UPC.
- "Extra Filters Library" for the computation of generalized Chebyshev
filter characteristic polynomials is distributed by UPC either in the source file
"libextrafilters.py", the corresponding bytecode file
"libextrafilters.pyc" or bound into a binary executable file. License
terms are described in the LICENSE.LIBEXTRAFILTERS file.
- "Lossy Filters Library" for the computation of characteristic
polynomials including filter losses is distributed by UPC either in the source file
"liblossyfilters.py", the corresponding bytecode file
"liblossyfilters.pyc" or bound into a binary executable file. License
terms are described in the LICENSE.LIBLOSSYFILTERS file.
- The "Extra Filters Library" and the "Lossy Filters Library"
need the "License Check Library", which distributed toghether with them
either in the executable Python bytecode file "libchecklicense.pyc" or
bound into a binary executable file. The source file "libchecklicense.py"
is not distributed. The "License Check Library" has been developed by UPC
for checking the user's license to run software released by the AntennaLab research
group at the Department of Signal Theory and Communications (TSC). The "License
Check Library" is distributed and licensed by UPC under the same terms as the
"Extra Filters Library" and the "Lossy Filters Library", with
the following additional restrictions:
- The source code is not distributed.
- It is specially forbidden to modify the "License Check Library"
source or binary code.
- It is also forbidden to reverse engineer, decompile, or disassemble the
"License Check Library" with the intent to violate license agreement of
the "Extra Filters Library" or the "Lossy Filters Library".
Lossyfilters software has been developed using Python interpreted language. Running the application
requires either (i) to install the Python interpreter and all additional libraries
used by the program, and then run the source files through the interpreter, or (ii)
to install some executable files that bind the sources with the python interpreter.
In the later case the required shared libraries must be installed in the same
directory.
There are three ways to install the lossyfilters software:
- For Microsoft Windows(R) or compatible platforms, run the
- setup_mwfiltersgui.exe installer, to install the free GUI with free filter
libraries.
- setup_lossifilters.exe installer, to install the free GUI with free filter
libraries plus the non-free "Extra Filters Library" and "Lossy
Filters Library".
This is the recommended option for windows systems.
It copies all the lossifilters binary files (executables and shared libraries),
source files, examples and documentation in folder c:\lossyfilters (by default) and
creates shortcuts to the application in the user Desktop and Start Menu. Parameter
files (.par) will be associated to the mwfiltersgui executable.
In Microsoft Windows(R) Vista or 7, it is necessary to execute the installer
with "Windows XP SP3" compatibility mode in order to successfully create
the association with .par files. Windows compatibility mode can be set by
rigth-clicking the .exe setup file or shortcut and then clicking "Troubleshoot
compatibility". In some cases, it mihgt be also necessary to execute the
program as an administrator.
There is an uninstall facility that can be accessed through the Windows Control
Panel "Add/Remove Programs" or through the Start Menu in folder "All
Programs / lossyfilters". It is recommened to uninstall the software before
installing a newer version. Uninstallation will leave untouched any stored results
in the program folder (by default c:\lossyfilters) and -if the non-free libraries
are installed- it will also leave the license file in the program folder. The new
installation must go to the same folder in order to access your stored results and,
if necessary, the license file.
- Copy the lossyfilters binary executable files to a directory in your computer.
This is not recommended for windows systems, since there is already a setup
installer that does it nicely.
The executable files are compressed in files with sufix
'exe.linux-x86_64-2.7.tar.gz' or 'exe.win32-2.7.zip', where the file name sufix
indicates the platform (linux or windows), the architecture (x86_64 or 32) and the
version of the Python interpreter embedded in the executables (2.7). The filename
prefix is 'mwfiltersgui' for the free GUI with free filter libraries, and
'lossyfilters' for the free GUI with free filter libraries plus non-free "Extra
Filters Library" and "Lossy Filters Library". Uncompress the tar.gz
or the zip file to a folder in your computer. The name of the executable file is
"mwfiltersgui". See how to run the executables below.
The linux executables do not work in all linux installations, as the shared
libraries supplied with the executables correspond to the developer's linux
distribution, and may be version-incompatible with other shared libraries installed
in the user's computer. The executables supplied in the CD have been tested in
Debian Squezee/Sid and Ubuntu Karmic distributions, and possibly should work in
other Debian-based distributions. They have failed in SUSE and possibly will fail
also in other rpm-based distributions. For that reason, in linux systems it is much
better to run the python sources, option 3) below.
- Install python interpreter and libraries to run the python sources. This is the
recommended option for linux systems. See section on installation of interpreter and libraries in Linux below.
With the python interpreter and required libraries installed, you can run the
myfiltersgui.py source file.
The procedure to install the license to run the non-free libraries is the
following:
- Install the non-free libraries files:
- If you are running an excutable files installation, then the non-free
libraries should be embedded within the executables. If they are not, uninstall the
software and reinstall a new executable distribution that includes the non-free
libraries.
- If you are running the source files -not an executable files
installation- copy the 'libextrafilters.pyc' file for the "Extra Filters
Library" and/or the 'liblossyfilters.pyc' file for the "Lossy Filters
Library", plus the libchecklicense.pyc file, to the folder containing your
source files.
- Run the software following instructions in section Running the application: In the GUI, open a
parameter file and click the 'Compute button' to execute a synthesis.
- A "License Error" message will appear saying that you do not have a
'AntennaLab_License.ini' file. Copy the sysinfo number that appears in the message
and sent it to lossyfilters@tsc.upc.edu, together with your name, company and e-mail
information.
- When you receive the 'AntennaLab_License.ini' file, copy it to the folder
containing your lossyfilters source or executable files. For the windows setup
installation, it is folder c:\lossyfilters\bin (by default). The folder name where
to copy the license file is given in the "License Error" message.
- Run again the software, open a parameters file and execute a synthesis to check
that the license is valid. License information should appear in the main window GUI
or in the console (if run from the command line with the - -nogui option).
There are three ways to run the program, depending on how you installed it
(windows setup, executables or source files). See Installing the application above.
- Windows setup installation
You can launch the program by:
- Double-clicking the Desktop icon. When the main window appears, click the
"Open Parameter File" toolbar button and select a parameter file (.par).
You can start with "Parameters.par" at the "examples" folder.
- Click the Windows Start Menu / All Programs / lossifilters and select the
"mwfiltersgui" executable. When the main window appears, click the
"File Open" toolbar button and select a parameter file (.par). You can
start with "Parameters.par" at the "examples" folder.
- Double-clicking a parameter file (.par) in your Windows Explorer. The installer
has asscoiated .par files with the mwfiltersgui executable. When the program opens,
it will automatically open your parameter file.
- Executable files installation
The executables are autoextractable compressed files that embed the sources and
the python interpreter. The required shared libraries are supplied with the
executables and must be installed in the same directory (see section Installing the application above).
The executable file name is "mwfiltersgui". See below the command line syntax.
Clicking or doublecliking the mwfiltersgui executable file in a file manager
should open the GUI. Then you can load a parameter file as explained above in this
section.
- Source file installation
With the Python interpreter and required libraries installed (see annex ), you
can run the mwfiltersgui.py source file. This is the recommended option in linux
systems. See below the command line syntax.
If the .py file extension is associated with the Python interpreter, clicking or
doublecliking the mwfiltersgui.py source file in a file manager should open the GUI.
Then you can load a parameter file as explained above in this section. While in
Windows systems the Python installation automatically associates .py files with the
interpreter, it is not like that in most linux distributions. If this is your case,
you have to use the settings application of your desktop manager to create the
association.
After loading a parameter file, the parameter edit window will show the contents
of your parameter file. Then click the "Compute" pushbutton in the
parameter edit window or the "Execute Synthesis" button in the main window
toolbar. A figure plotting [S] parameters will appear. The you can click the
"Coupling Matrix" toolbar button in the main window and go to the coupling
matrix window, where you can edit or transform the matrix.
mwfiltersgui.py [-hvsrmep:] [filename]
mwfiltersgui.py [-hvs] --nogui [filename]
- - -nogui:
- Do not open the GUI and run the synthesis from the console. Needs a filename
parameter.
- filename:
- Parameter file name. Mandatory for the console interface (- -nogui option),
optional for the GUI.
- -h:
- Print a complete list of command line arguments.
- -v:
- Verbose output. Show more information (for debugging) at the log in the main
window (or at the console with –nogui flag).
- -s:
- Automatically symmetrize Generalized Chebyshev zeros in Hz in order to compute
a folded matrix with uniform Q in resonators.
- -r:
- Automatically run Synthesis. Needs simultaneous parameter file specification.
Meaningless with console interface (- -nogui option), since in this case it
always automatically runs synthesis and saves the results.
- -m:
- Automatically open Coupling Matrices window. Needs simultaneous -r flag.
Meaningless with console interface (- -nogui option), since in this case it
cannot open windows.
- -e:
- Automatically open Matrix Edit window. Needs simultaneous -m flag.
Meaningless with console interface (- -nogui option), since in this case it
cannot open windows.
- -p N:
- Save all default coupling matrices to file after they are computed, using N
significant digits. By default the matrices must be saved manually using the GUI.
- Running executables in MS-Windows:
Double click mwfiltersgui.exe in the windows explorer or open a DOS terminal and
run:
c:\folder> mwfiltersgui -h
c:\folder> mwfiltersgui --nogui parameter_file
c:\folder> mwfiltersgui [parameter_file]
- Running executables in Linux:
Open a Linux console and run:
$ mwfiltersgui -h
$ mwfiltersgui --nogui parameter_file
$ mwfiltersgui [parameter_file]
- Running sources in MS-Windows:
In MS-Windows, the .py files will be opened by the python interpreter. Double
click mwfiltersgui.py in the windows explorer or run:
c:\folder> mwfiltersgui.py -h
c:\folder> mwfiltersgui.py --nogui parameter_file
c:\folder> mwfiltersgui.py [parameter_file]
- Running sources in Linux:
In most linux distributions python sources files will be automatically opened by
the python interpreter if they have execute permission.
Open a Linux console and run:
$ mwfiltersgui.py -h
$ mwfiltersgui.py --nogui parameter_file
$ mwfiltersgui.py [parameter_file]
If the system does not identify these files as python sources, run:
$ python mwfiltersgui.py -h
$ python mwfiltersgui.py --nogui parameter_file
$ python mwfiltersgui.py [parameter_file]
Updated versions of the libraries compiled for MS Windows can be found in: http://www.lfd.uci.edu/ gohlke/pythonlibs
Since PyQwt library is no longer mantained, it is very important to get first a
compiled version of this library and then the exact versions of the other libraries
against which PyQwt has been compiled. Below we provide library version numbers and
download links that have work well in our instalation.
Please remember that PyQwt library must be the last to be installed.
- Python interpreter: http://www.python.org
- Download http://www.python.org/ftp/python/2.7.5/python-2.7.5.msi (32-bit windows) or http://www.python.org/ftp/python/2.7.5/python-2.7.5.amd64.msi (64-bit).
- Install python-2.7.5.msi or python-2.7.5.amd64.msi. Keep all default options.
- PyQt GUI development: http://www.riverbankcomputing.co.uk, http://pyqwt.sourceforge.net
- Download PyQt-Py2.7-x32-gpl-4.9.6-1.exe or PyQt-Py2.7-x64-gpl-4.9.6-1.exe from
http://www.lfd.uci.edu/ gohlke/pythonlibs
- Install PyQt-Py2.7-x32-gpl-4.9.6-1.exe or PyQt-Py2.7-x64-gpl-4.9.6-1.exe AFTER
installing python-2.7.5.msi or python-2.7.5.amd64.msi. Keep all default options. It
will detect the folder where python is installed.
- In order to update your PATH environment variable with the location of Qt
libraries, logout and login again into Windows.
- Numpy and Scipy python modules: http://www.numpy.org and http://www.scipy.org
The latest numpy and scipy versions that have been tested are respectively 1.7.1
and 0.12.0. Earlier versions are not recommened, since the latest ones include bug
fixes and funcionality enhancements that might be necessary for the correct function
of the software. Although it is advisable to install the numpy and scipy library
versions against which PyQwt has been compiled, newer versions may also work. If you
prefer newer versions, be aware that there might be some incompatibility with pyqwt
library 5.2 that may requiere recompilation of that library agaist the new version
of numpy and scipy.
- Download http://sourceforge.net/projects/numpy/files/NumPy/1.7.1/numpy-1.7.1-win32-superpack-python2.7.exe.
- Install numpy-1.7.1-win32-superpack-python2.7.exe AFTER installing
python-2.7.5.msi. Keep all default options. It will detect the folder where python
is installed.
- Download http://prdownloads.sourceforge.net/scipy/scipy-0.12.0-win32-superpack-python2.7.exe
- Install scipy-0.12.0-win32-superpack-python2.7.exe AFTER installing
numpy-1.7.1-win32-superpack-python2.7.exe. Keep all default options. It will detect
the folder where Python is installed.
- Unofficial Numpy and Scipy installation binaries can be found at http://www.lfd.uci.edu/ gohlke/pythonlibs/. There
are versions compiled for 64-bits and versions including high-performance Intel MKL
libraries.
- To improve performance of linear algebra operations in Python, optionally
install either the Intel Math Kernel Library (MKL) http://www.intel.com/cd/software/products/asmo-na/eng/307757.htm or the Basic Linear Algebra
Subprograms (BLAS) http://www.netlib.org/blas, the Linear Algebra PACKage (LAPACK) http://www.netlib.org/lapack and the
Automatically Tuned Linear Algebra Software (ATLAS) http://math-atlas.sourceforge.net/ . Although lossyfilters
software does not perform operations with large matrices, it is advisable to install
MKL or BLAS + LAPACK + ATLAS for other applications.
Instructions for installation of Scipy with MKL or BLAS + LAPACK + ATLAS can be
found in http://www.scipy.org/Installing_SciPy/Windows . The ATLAS installation web page http://math-atlas.sourceforge.net/atlas_install contains also useful
information.
- To improve performance of FFT operations in Python, optionally install the
FFTW3 http://www.fftw.org library. Although lossyfilters software does not perform FFT operations,
it is advisable to install the package for other applications. Instructions for
installation in MS-Windows can be found in http://www.fftw.org/install/windows.html . Pre-compiled DLL files can de
downloaded from ftp://ftp.fftw.org/pub/fftw/fftw-3.2-dll.zip (32-bit version) and ftp://ftp.fftw.org/pub/fftw/fftw-3.2-dll64.zip (64-bit version).
- PyQwt library: http://pyqwt.sourceforge.net
- Download PyQwt-5.2.1-py2.7-x32-pyqt4.9.6-numpy1.7.1.exe or
PyQwt-5.2.1-py2.7-x64-pyqt4.9.6-numpy1.7.1.exe from http://www.lfd.uci.edu/ gohlke/pythonlibs
- Install PyQwt-5.2.1-py2.7-x32-pyqt4.9.6-numpy1.7.1.exe or
PyQwt-5.2.1-py2.7-x64-pyqt4.9.6-numpy1.7.1.exe AFTER installing python, pyQt, numpy
and scipy. Keep all default options. It will detect the folder where python is
installed.
- Eric development environment (OPTIONAL): http://eric-ide.python-projects.org
- Download http://sourceforge.net/projects/eric-ide/files/eric4/stable/4.5.12/eric4-4.5.12.zip or get latest 4.x version from: http://sourceforge.net/project/showfiles.php?group_id=119070&package_id=233329 .
- Unpack: eric4-4.5.12.zip
- In the folder where eric4-4.5.12.zip has been unpacked, AFTER installing python
and pyQt, run:
c:\folder> install.py
- To run eric4, either run eric4.bat or eric4-tray.bat. Both are located at the
python folder (for example, c:\Python27). The first opens the eric4 IDE, while the
second embeds an icon in the system tray, which contains a context menu to start
eric4 and all its utilities. Double clicking this icon starts the eric4 IDE.
You can either install binaries from your distribution repository or download
the libraries sources, compile and install. Installing from the repository is highly
recommended, as compiling and installing the sources will fail if there are missing
library headers in the system. If this is the case, the corresponding development
libraries must be installed from your distribution repository in order to get the
missing headers.
Before taking any steps to install the libraries, it is advisable to check if
they are already installed.
Normally it will be enough to install python2.5, python2.6 or python 2.7, and
the latest versions of pyQt4, scipy and pyQwt5. The other packages should be
automatically installed as dependencies.
Example for distributions with apt package system (change package
names depending on your distribution):
# apt-get install python2.7 python-qt4 python-scipy python-qwt5-qt4 libatlas3gf-base libfftw3-3
Packages libatlas3gf-base and libfftw3-3 above are optional and intended only to
improve performance with large matrix algebra. Since the lossyfilters software works
with small matrices, there will be no performace improvement using these libraries.
The following packages must be installed in the system (note that the package
names may vary from one distribution to another):
- Python interpreter: python2.5, python2.6 or python 2.7. Although all
these versions will run the .py lossyfilters sources, only version 2.6.x will run
the .pyc bytecode files distributed with version <=2.0 of the software. Later
versions (>2.0) will run with python 2.7.x . Accordingly, any Python python2.5,
python2.6 or python 2.7 can be used to run the free GUI and free libraries source
files. Regarding the non-free "Extra Filters Library" and "Lossy
Filters Library", users having the .py source files in their system can also
use any python2.5, python2.6 or python 2.7 version, while users having only the .pyc
files (the most common case) need Python 2.6.x for lossyfilters version <=2.0 and
Python 2.7.x for lossyfilters version >2.0 .
- Qt4 version 4.5.x or later (libqtcore4 and libqtgui4 on Debian, ... )
- sip4 version 4.8 or later, should be compatible with the version of pyQt4 to be
installed below (python-sip4 in Debian, ......... )
- Qscintilla2 Python bindings version 2.4 or later, should be compatible with the
version of pyQt4 to be installed below (python-qscintilla2 on Debian, ... ). Needs
Qscintilla2 library, but it should be automatically installed by the linux package
management utility.
- pyQt4 version 4.5.x or later (python-qt4 in Debian, kdebindings3-python in
SUSE>=9.2, ... )
- numpy version 1.5.1 or later, should be compatible with the version of scipy to
be installed below (python-numpy in Debian)
- scipy version 0.8 or later (python-scipy in Debian)
- pyQwt5 version 5.2 or later, should be compatible with the version of pyQt4
installed above (python-qwt5-qt4 in Debian). It should be also compatible with the
version of numpy installed above.
Since the pyQwt5 package is not updated frequently, it may be incompatible with
the versions of Qt4 and sip in your system. If this is the case, running the
mwfiltersgui executable with throw an error when interacting with the plot graph
window. To solve the problem you can recompile the pyQwt5 package in your system. In
debian based systems, the instructions for package recompilation are:
# apt-get built-dep python-qwt5-qt4
# apt-get source -b python-qwt5-qt4
The following combinations of package versions have been tested successfully:
- Python 2.5.4, sip4 4.9, python-sip4 4.9, Qt4 4.5.3, pyQt4 4.6, Qwt5 5.2.0,
pyQwt5 5.2.1, numpy 1.3.0, scipy 0.7.0 in Debian unstable (2009-11-12)
- Python 2.6.4, sip4 4.9, python-sip4 4.9, Qt4 4.5.3, pyQt4 4.6, Qwt5 5.2.0,
pyQwt5 5.1.1, numpy 1.3.0, scipy 0.7.0 in Ubuntu 9.10 Karmic
- Python 2.6.5, sip4 4.10.1, python-sip4 4.10.1, Qt4 4.6.2, pyQt4 4.7.2, Qwt5
5.2.0, pyQwt5 5.2.1, numpy 1.3.0, scipy 0.7.0 in Ubuntu 10.04 Lucid
- Python 2.6.6, sip4 4.10.5, python-sip4 4.10.5, Qt4 4.7.0, pyQt4 4.7.4, Qwt5
5.2.0, pyQwt5 5.2.1, numpy 1.3.0, scipy 0.7.2 in Ubuntu 10.10 Maverick
- Python 2.6.6, sip4 4.10.5, python-sip4 4.10.5, Qt4 4.7.0, pyQt4 4.7.4, Qwt5
5.2.0, pyQwt5 5.2.1, numpy 1.4.1, scipy 0.7.2 in Ubuntu 10.10 Maverick
- Python 2.6.6, sip4 4.11.2, python-sip4 4.11.2, Qt4 4.7.0, pyQt4 4.8.1, Qwt5
5.2.0, pyQwt5 5.2.1, numpy 1.5.1, scipy 0.8.0 in Ubuntu 10.10 Maverick
- Python 2.7.1, sip4 4.11.2, python-sip4 4.11.2, Qt4 4.7.2, pyQt4 4.8.3, Qwt5
5.2.0, pyQwt5 5.2.1, numpy 1.5.1, scipy 0.8.0 in Ubuntu 11.04 Natty
- Python 2.7.3, python-sip 4.13.3, Qt4 4.8.3, pyQt4 4.9.3, Qwt5 5.2.1, pyQwt5
5.2.1, numpy 1.6.2, scipy 0.10.0 un Ubuntu 12.10 Quantal
Optional packages with optimized libraries to increase performance of Numpy and
Scipy are:
- atlas (libatlas3gf-base in Debian). The Automatically Tuned Linear Algebra
Software (ATLAS) http://math-atlas.sourceforge.net/ library is optional, but it will greatly increase performance
of linear algebra operations in Python. The Basic Linear Algebra Subprograms (BLAS)
http://www.netlib.org/blas and the Linear Algebra PACKage (LAPACK) http://www.netlib.org/lapack will be automatically installed as
dependencies when installing ATLAS. Although lossyfilters software does not perform
operations with large matrices, it is advisable to install the package for other
applications.
- fftw3 (libfftw3-3 in Debian). The FFTW3 http://www.fftw.org library is optional, but it will
greatly increase performance of FFT in Python. Although lossyfilters software does
not perform FFT operations, it is advisable to install the package for other
applications.
- The python interpreter will be already installed in most linux distributions.
It MUST BE python version 2.5, version 2.6 or version 2.7 . Earlier versions will
not work, and version 3 is backwards incompatible.
- Qt4 library and possibly sip4 and pyQt4 will be present in linux installations
having the KDE desktop (for example Kubuntu and Debian with KDE).
- In Ubuntu 10.10 Maverick and in Ubuntu 11.04 Natty, the python-qwt5-qt4 package
may need to be recompiled in order to work successfully with the versions of sip and
Qt4 installed in the system. See above for recompilation instructions.
- The latest numpy and scipy versions available in Ubuntu that have been tested
when preparing this document (2013-06-11) are respectively 1.6.2 and 0.10.0. Earlier
versions are not recommened, since the latest ones include bug fixes and
funcionality enhancements that might be necessary for the correct function of the
software. Install newer versions with caution, since there might be some
incompatibility with pyqwt library 5.2 that may requiere recompilation of package
python-qwt5-qt4.
In Ubuntu 10.10 Maverick (updated 2010-11-26) the latest version of python-numpy
and python-scipy packages available in the repository is respectively 1.3.0 and
0.7.2. If you wish to install newer versions, you can download them from the debian
unstable or Ubuntu 11.04 Natty repositories and check dependencies to see if they
are compatible with other packages in your system:
http://ftp.de.debian.org/debian/pool/main/p/python-numpy/python-numpy_1.5.1-2+b1_amd64.deb
http://de.archive.ubuntu.com/ubuntu/pool/main/p/python-numpy/python-numpy_1.5.1-1ubuntu2_amd64.deb
http://ftp.de.debian.org/debian/pool/main/p/python-scipy/python-scipy_0.9.0+dfsg1-1+b2_amd64.deb
http://de.archive.ubuntu.com/ubuntu/pool/universe/p/python-scipy/python-scipy_0.8.0+dfsg1-1ubuntu1_amd64.deb
for 64-bit systems and
http://ftp.de.debian.org/debian/pool/main/p/python-numpy/python-numpy_1.5.1-2+b1_i386.deb
http://de.archive.ubuntu.com/ubuntu/pool/main/p/python-numpy/python-numpy_1.5.1-1ubuntu2_i386.deb
http://ftp.de.debian.org/debian/pool/main/p/python-scipy/python-scipy_0.9.0+dfsg1-1+b2_i386.deb
http://de.archive.ubuntu.com/ubuntu/pool/universe/p/python-scipy/python-scipy_0.8.0+dfsg1-1ubuntu1_i386.deb
for 32-bit.
In Ubuntu 11.04 Natty (updated 2011-05-07) the latest versions are python-numpy
1.5.1 and python-scipy 0.8.0.
- Detailed and updated instructions for installation of Numpy and Scipy with
optimized linear algebra and FFTW libraries can be found in http://www.scipy.org/Installing_SciPy/Linux. The ATLAS
installation web page http://math-atlas.sourceforge.net/atlas_install contains also useful information.
In 2009 we prepared a script to install ATLAS in a Debian distribution:
- Unpack file build_atlas_debian.tar.gz
- Run build_atlas.sh script.
This script is now obsolete, but it is distributed with the software just in
case it may be useful to somebody. It should be easy to modify the script for other
distributions, following the instructions in http://www.scipy.org/Installing_SciPy/Linux and http://math-atlas.sourceforge.net/atlas_install .
In Ubuntu 10.10 Maverick (and possibly 11.04 Natty), the instructions to compile
ATLAS library customized for your CPU are:
$ sudo apt-get build-dep libatlas3gf-base
$ sudo apt-get install devscripts
$ mkdir optim_libs
$ cd optim_libs
$ apt-get source libatlas3gf-base
$ cd atlas-*
$ fakeroot debian/rules custom
$ cd ..
$ sudo dpkg -i libatlas3gf-base_*.deb
In the first place, it is necessary to have the GNU C++ compiler installed http://gcc.gnu.org/.
From the repository of your distribution, install g++ (the package name may
vary from one distribution to another). Other packages such as gcc and libraries
should be automatically installed as dependencies.
Example for distributions with apt package system:
# apt-get install g++
It is likely that the compilation process detects missing headers (*.h C/C++
files). If this is the case, you have to find which is the development package that
contains this file. For example, we found that file Xlocale.h was missing. Running
# apt-file search Xlocale.h
reported
libx11-dev: /usr/include/X11/Xlocale.h
which means that we have to install the libx11-dev library:
# apt-get install libx11-dev
Installation procedure:
- Python interpreter: http.//www.python.org
- PyQt GUI development: http://www.riverbankcomputing.co.uk
Before you can build PyQt you must have already built and installed the Qt
library, SIP and Qscintilla2:
- Qt:
- SIP:
- Qscintilla2:
- pyQt:
- Numpy and Scipy: http://www.numpy.org http://www.scipy.org.
Detailed instructions for installation of Numpy and Scipy with optimized linear
algebra libraries can be found in http://www.scipy.org/Installing_SciPy/Linux.
- pyQwt: http://pyqwt.sourceforge.net
- Eric development environment (OPTIONAL): http://eric-ide.python-projects.org